package cn.ms.doctor.Entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName doctor_drugsorder
 */
@Data
public class Drugsorder implements Serializable {
    /**
     * 药品id
     */
    private Integer drugsId;

    /**
     * 订单id
     */
    private Integer orderId;

    /**
     * 药品数量
     */
    private Long drugsCount;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Drugsorder other = (Drugsorder) that;
        return (this.getDrugsId() == null ? other.getDrugsId() == null : this.getDrugsId().equals(other.getDrugsId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getDrugsCount() == null ? other.getDrugsCount() == null : this.getDrugsCount().equals(other.getDrugsCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDrugsId() == null) ? 0 : getDrugsId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getDrugsCount() == null) ? 0 : getDrugsCount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", drugsId=").append(drugsId);
        sb.append(", orderId=").append(orderId);
        sb.append(", drugsCount=").append(drugsCount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}